package cn.edu.scau.cmi.ema.dao;

import cn.edu.scau.cmi.ema.base.CmiPagination;
import cn.edu.scau.cmi.ema.domain.Food;
import org.springframework.dao.DataAccessException;

import java.util.Set;

public interface FoodDAO extends JpaDao<Food> {

	public Food findFoodById(Integer id) throws DataAccessException;

	public Food findFoodById(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Food> findFoodByName(String name) throws DataAccessException;

	public Set<Food> findFoodByName(String name, int startResult, int maxRows) throws DataAccessException;

	public Set<Food> findFoodByNameContaining(String name_1) throws DataAccessException;

	public Set<Food> findFoodByNameContaining(String name_1, int startResult, int maxRows) throws DataAccessException;

	public Set<Food> findFoodByDescription(String description) throws DataAccessException;

	public Set<Food> findFoodByDescription(String description, int startResult, int maxRows) throws DataAccessException;

	public Set<Food> findFoodByDescriptionContaining(String description_1) throws DataAccessException;

	public Set<Food> findFoodByDescriptionContaining(String description_1, int startResult, int maxRows)
			throws DataAccessException;

	public Food findFoodByPrimaryKey(Integer id) throws DataAccessException;

	public Food findFoodByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Food> findFoodsByIds(Set<Integer> ids) throws DataAccessException;

	public Set<Food> findAllFoods() throws DataAccessException;

	public Set<Food> findAllFoods(int startResult, int maxRows) throws DataAccessException;

	public Set<Food> findFoodsByBrand(Integer brandId, int start, int max);

	public Set<Food> findFoodsByExpire(Integer expireId, int start, int max);

	public Set<Food> findFoodsByStoremethod(Integer storemethodId, int start, int max);

	public Set<Food> findFoodsByProducer(Integer producerId, int start, int max);

	public Set<Food> findFoodsByFoodtype(Integer foodtypeId, int start, int max);

	public Set<Food> findFoodsByProductcode(Integer productcodeId, int start, int max);

	public Set<Food> findFoodsByTaste(Integer tasteId, int start, int max);

	public Set<Food> findFoodByCompositeProperities(String sql, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Food> findFoodsByDetachedCriteria(CmiPagination page) throws DataAccessException;

	public Food findFoodByPhysicalPrimaryKey(String name, Integer foodtypeId, Integer productcodeId, Integer brandId)
			throws DataAccessException;

	public Food findFoodByPhysicalPrimaryKey(String name, Integer foodtypeId, Integer productcodeId, Integer brandId,
			int startResult, int maxRows) throws DataAccessException;
}
